package cn.itcast.bos.dao.base;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.bos.domain.base.Standard;

public interface StandardRepository extends JpaRepository<Standard, Integer> {
	List<Standard> findByName(String name);

	@Query(value = "from Standard where name=?", nativeQuery = false)
	List<Standard> queryName(String name);

	@Query(value = "update Standard set minLength = ? where id=?")
	@Modifying
	void updateMinLength(Integer minLength, Integer id);

}
